#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_os.py
# author:wmf
# datetime:2021/4/1 14:04
# software: PyCharm
'''
this is function description
'''
# import module your need

import os

# os.system('cls') #清屏
#
# print('hahahaha')

# os.mkdir('d:\\abc') #在d盘下创建abc文件夹
# os.rename('d:\\abc','d:\\a') #将d盘下的abc文件夹改名为a文件夹

# os.remove('d:\\abc') #在d盘下删除abc文件夹

# print(os.environ) #打印环境变量

# os.system('shutdown -s') #关机

# file_path = r'd:\a\1.txt'
#
# # os.remove(file_path) #删除该路径下的文件
#
path = r'd:\a'
#
# print(os.listdir(path)) #打印该路径下的所有文件
#
# for f in os.listdir(path):
#     if os.path.isdir(os.path.join(path,f)):
#         print(f)
#     else:
#         os.remove(os.path.join(path,f))
#     # print(f)

def list_dir(lpath):
    list1 = os.listdir(lpath)
    for f in list1:
        filename = os.path.join(lpath,f)
        print(filename)

list_dir(path)